package pcloud.server;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

public class Logger
{

	static public void log(String logText)
	{
		log(logText, true);
	}
	
	static public void log(String logText, boolean isAppend)
	{
		System.out.println(logText);
		File file = new File("D:/pcloud/ftpserver/server.log");
		try {
			FileWriter streamWriter;
			streamWriter = new FileWriter(file, isAppend);
	
			streamWriter.write("\r\n---\r\n" + logText + "\r\n");
			streamWriter.flush();
			streamWriter.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
